/* Add viewport meta tag support */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
}

#full-wrapper{
    display: grid;
    grid-template-columns:75% 25% ;
    padding-top: 1.6em;
    padding-right: 1.8em;
    max-width: 100%;
    overflow: hidden;
}
.odd{
  font-size: 1.4em;
  font-weight: 600;
  color: black;
}
.even{
  font-size: 1.3em;
  font-weight: 600;
  color: rgba(109, 108, 108, 0.6);
}
#plus{
  color: rgba(109, 108, 108, 0.6);
  float: right;
}
.main{
    margin:0.05em 1.2em;
}
.top{
    display: grid;
    grid-template-columns: 62% 38%;
    gap : 1.7em;
    width:98%;
    min-height: 300px;
}
.device{
    border:1px solid rgb(156, 153, 153);
    border-radius: 18px;
    padding: 0.4em 1em;
    display: grid;
    grid-template-columns: 30% 70%; 
    min-height: 280px;
}
#inner-header{
  display: grid;
  grid-template-columns: 88% 12%;
  margin-right: -0.7em;
}
#inner-header p{
    font-weight:bold;  
}
#energy{
    display: grid;
    grid-template-columns: 50% 50%;
    width: 100%;
    height: 4em;
    margin-top: 1.7em;
    border:1px solid rgb(225, 208, 209);
    text-align: center;
    padding:0.1em;
    background-color: rgba(168, 191, 211, 0.2);
    border-radius: 18px;
}
.time span{
    font-size: 1.5em;
    font-weight: 700;
}
.time p{
font-size: 0.7em;
}
.auto{
    display: grid;
    grid-template-columns: 50% 50%;
    margin-top: 1.3em;
    padding:0.1em;  
}
.on{
height: 3em;
border:1px solid rgb(225, 208, 209);
margin-right: 0.5em;
padding: 0.5em;
border-radius: 10px;
}
.on p{
    line-height: 0.8;
}
.off{
    height: 3em;
    border:1px solid rgb(225, 208, 209);
    margin-left: 0.5em;
    padding: 0.5em;
    border-radius: 10px;
}
.off p{
    line-height: 0.8;
}
.fa-sun{
    font-size: 1.3em;
    color: black;
    margin-left: 1em;
}
#bar{
    margin-top: 1.4em;
    margin-bottom:0.8em;
}
#consumption{
    border:1px solid rgb(156, 153, 153); 
    border-radius: 18px;
    padding: 1em;
    width: 92%;
}
#consumption h5{
font-weight: 600;
}
.middle{
    display:grid;
    grid-template-columns: 33% 32% 35%;
    gap:1.4em;
    margin-top: 1.2em;
    margin-bottom: 1.2em;
    width: 93%;
}
.middle-box{
    border:1px solid rgb(225, 208, 209);
    border-radius: 16px;
    padding-top: 1.1em;
    padding-left: 0.7em;
    padding-bottom: 0.5em;
    background-color: rgba(168, 191, 211, 0.2);

}
.middle-box h2{
line-height: 0.8;
margin-top: 0.1em;
font-weight: 600;
}
.middle-box p{
    margin-bottom: 0px;
    font-size: 1.1em;
}
.bottom{
    display: grid;
    grid-template-columns: 25% 25% 25% 25%;
    gap:1em;
    height: 8em;
    padding-bottom: 0.1em;
    margin-bottom: 0.1;
    width: 93%;
}
.card{
    padding: 1em;
}
.card-text{
    position: relative;
    top: 35%;
}
.card-text h5{
    margin-top: 0.1em;
}
.card-text p{
    margin-bottom: 0em;
}
.c-top{
  display: grid;
  grid-template-columns: 50% 50%;
}
.icon{
  font-size: 1.4em;
  color: black;
  margin-top: -0.3em;
}
.switch-cont{
  position: relative;
  left: 70%;
}
.switch {
    position: relative;
    display: inline-block;
    width: 30px;
    height: 16px;
  }
  
  /* Hide default HTML checkbox */
  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }
  
  /* The slider */
  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .2s;
    transition: .4s;
  }
  
  .slider:before {
    position: absolute;
    content: "";
    height: 13px;
    width: 13px;
    left: 1px;
    bottom: 1px;
    background-color: white;
    -webkit-transition: .2s;
    transition: .4s;
  }
  
  input:checked + .slider {
    background-color: #2196F3;
  }
  input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
  }
  
  input:checked + .slider:before {
    -webkit-transform: translateX(13px);
    -ms-transform: translateX(13px);
    transform: translateX(13px);
  }
  
  
  .slider.round {
    border-radius: 34px;
  }
  
  .slider.round:before {
    border-radius: 50%;
  }
  .right-corner{
    background-image:radial-gradient( rgb(36, 55, 99) 0%, rgb(1, 1, 37) 100%);
    border-radius: 19px;
    justify-content: center;
    align-items: center;
    padding-bottom: 0;
  }
.line{
    position: relative;
    margin-top: -0.7em;
    margin-left:43% ;
    width: 18%;
    height: 0.8em;
    border-top: 2px solid rgb(156, 153, 153);
  }
#time2{
text-align: center;
}
#time2 p{
    font-size: 1.7em;
    color: white;
  }
#Trow{
    margin: 1.8em 1.5em;
    display:grid;
    grid-template-columns: 70% 30%;
  }
.thermo p{
    color: white;
    font-weight: 600;
}
.toggle label{
    float: right;
    margin-top: 0.35em;
}
.pro-cont{
    height: 180px;
}
#Trow2{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin: 0.6em;
    height: 4.2em;
    align-content: space-between;
}
#Trow2 > div {
    background-color: rgb(73, 72, 72);
    width: 4.5em;
    color: rgb(180, 176, 176);
    padding: 0.3em;
    font-size: 1em;
    border-radius: 9px;
    text-align: center;
  }
  #music{
    background-color: white;
    margin:1.5em 1.1em;
    margin-bottom: -0.5em;
    border-radius: 12px;
    text-align: center;
    padding: 1em 0.5em;
  }
  #music p{
    font-size: 0.8em;
  }
  #music h5{
    line-height: 0.8em;
    margin-top: -0.6em;
    font-weight: 600;
  }
  #bar2{
    margin: 1.5em 0.5em;
    height:0.5em;
  }
  #Trow3{
    display: flex;
    flex-direction: row;
    flex-direction: row;
    justify-content: space-between;
    margin: 0.8em 1.2em;
    height: 2.2em;
    align-content: space-between;
  }
  #Trow3 > div{
    border: 1px solid rgb(167, 166, 166);
    padding: 0.2em 0.6em 0.7em 0.6em;
    text-align: center;
    border-radius: 50%;
    background-color: rgb(219, 218, 218);
  }
  .progress-circle {
    position: relative;
    width: 140px;
    height: 130px;
    border-radius: 50%;
    background: conic-gradient(#4fc3f7 0% 40%, rgba(255, 255, 255, 0.1) 40% 100%);
    margin-top: -1em;
    margin-left: 30%;
  }

  .progress-circle::before {
    content: "";
    position: absolute;
    top: 16px;
    left: 16px;
    width: calc(100% - 32px);
    height: calc(100% - 32px);
    background-color: #0f2c47;
    border-radius: 50%;
  }

  .progress-circle span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5rem;
    color: white;
  }

  .control-buttons {
    display: flex;
    margin-top: 20px;
    margin-left: 33%;
  }

  .control-buttons button {
    background-color: #4fc3f7;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    margin: 0 18px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .control-buttons button:hover {
    background-color: #0f506e;
  }
  .chart{
    min-width: 250px;
    max-width: 100%;
    text-align: center;
    height: auto;
  }

  @media only screen and (min-width:1025px) and (max-width:1200px){
    #full-wrapper{
      grid-template-columns: 68% 32%;
      padding-right: 1.2em;
      padding-left: 1.2em;
    }
    .top{
      grid-template-columns: 58% 42%;
      gap: 1.6em;
    }
    .device{
      grid-template-columns: 32% 68%;
    }
    .device img{
      max-height: 250px;
    }
    .middle{
      grid-template-columns: repeat(3, 1fr);
      gap: 1.3em;
      width: 96%;
    }
    .bottom{
      grid-template-columns: repeat(4, 1fr);
      gap: 1.1em;
      width: 96%;
    }
    .right-corner{
      width: 100%;
    }
    #consumption{
      width: 96%;
    }
    .chart{
      min-width: 240px;
    }
  }

  @media only screen and (max-width:1200px){
    #full-wrapper{
      grid-template-columns: 70% 30%;
      padding-right: 1em;
    }
    .top{
      grid-template-columns: 60% 40%;
    }
  }

  @media only screen and (min-width:769px) and (max-width:1024px){
    #full-wrapper{
      grid-template-columns: 65% 35%;
      padding-right: 1em;
      padding-left: 1em;
    }
    .top{
      grid-template-columns: 55% 45%;
      gap: 1.5em;
    }
    .device{
      grid-template-columns: 35% 65%;
      padding: 0.8em;
    }
    .device img{
      max-height: 220px;
      object-fit: contain;
    }
    .middle{
      grid-template-columns: repeat(3, 1fr);
      gap: 1.2em;
      width: 95%;
    }
    .bottom{
      grid-template-columns: repeat(2, 1fr);
      gap: 1.2em;
      width: 95%;
    }
    .card{
      min-height: 140px;
    }
    .right-corner{
      width: 100%;
      margin-top: 1.5em;
    }
    #consumption{
      width: 95%;
    }
    .chart{
      min-width: 220px;
    }
    .time span{
      font-size: 1.3em;
    }
    .odd{
      font-size: 1.2em;
    }
    .even{
      font-size: 1.1em;
    }
  }

  @media only screen and (max-width:768px){
    #full-wrapper{
      display: grid;
      grid-template-columns: 100% ;
      padding-right: 0.5em;
      padding-left: 0.5em;
    }

    .main{
      margin: 0;
    }
    .top{
      display: grid;
      grid-template-columns: 100%;
      gap : 1em;
      width:100%;
    }
    .device{
      padding: 0.8em;
      display: grid;
      grid-template-columns: 35% 65%; 
      min-height: auto;
    }
    .device img{
      width: 100%;
      height: auto;
      max-height: 200px;
      object-fit: contain;
    }
    .time span{
      font-size: 1.2em;
      font-weight: 600;
    }
    .middle{
      grid-template-columns: repeat(2, 1fr);
      gap: 1em;
      width: 100%;
    }
    .bottom{
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap:1em;
      height: auto;
      padding-bottom: 1em;
      width: 100%;
    }
    .card{
      min-height: 120px;
    }
    .card-text{
      position: relative;
      top: 25%;
    }
    .right-corner{
      padding-bottom: 1.5em;
      width: 100%;
      margin: 2em 0;
    }
    #consumption{
      width: 100%;
    }
    .chart{
      min-width: 200px;
    }
  }

  @media only screen and (max-width:576px){
    .odd{
      font-size: 1.1em;
    }
    .even{
      font-size: 1em;
    }
    .device{
      grid-template-columns: 100%;
      text-align: center;
    }
    .device img{
      max-height: 150px;
      margin: 0 auto;
    }
    .middle{
      grid-template-columns: 1fr;
      gap: 0.8em;
    }
    .middle-box{
      text-align: center;
    }
    .bottom{
      grid-template-columns: 1fr;
      gap: 0.8em;
    }
    .card{
      min-height: 100px;
    }
    .card-text{
      top: 20%;
    }
    .time span{
      font-size: 1.1em;
    }
    .chart{
      min-width: 150px;
    }
    #energy{
      height: auto;
      padding: 0.5em;
    }
    .auto{
      margin-top: 1em;
    }
  }

  @media only screen and (max-width:400px){
    .main{
      margin: 0;
      padding: 0 0.5em;
    }
    .odd{
      font-size: 1em;
    }
    .even{
      font-size: 0.9em;
    }
    .device img{
      max-height: 120px;
    }
    .time span{
      font-size: 1em;
    }
    .middle-box h2{
      font-size: 1.5em;
    }
    .card-text h5{
      font-size: 1em;
    }
    .chart{
      min-width: 120px;
    }
  }
